package Commands

import (
	"fmt"

	"hyper/supports/queue/abstruct"
	"hyper/supports/queue/factories"

	"github.com/rabbitmq/amqp091-go"
)

func RabbitMqCommandDemo() {
	obj := &abstruct.QueueObj{
		Name: "jybtx",
		Data: nil,
	}

	new(factories.RabbitMqQueue).New(obj).Consumer(func(d amqp091.Delivery) {
		fmt.Println(string(d.Body))

		d.Ack(true)
	})
}
